<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html>
<html>
<head>
<base href="<%=basePath%>">
<title>兑换记录</title>
<%@include file="../collect/meta.jsp"%>
<link rel="stylesheet" href="css/radius.css" type="text/css"></link>
<link rel="stylesheet" href="css/table.css" type="text/css"></link>
<link rel="stylesheet" href="css/btn-bottom.css" type="text/css"></link>
<script type="text/javascript" src="${ctx}/js/returnTop.js"></script>
</head>
<body lang="zh-cn">
	<div class="wrapper">
		<c:import url="/collect/top.jsp"></c:import>
		<div class="main-container" id="main-container">
			<div class="main-container-inner">
				<c:import url="/collect/left.jsp"></c:import>
				<div class="main-content">
					<div class="breadcrumbs" id="breadcrumbs">
						<ul class="breadcrumb">
							<li><i class="icon-home home-icon"></i>商品兑换</li>
							<li>兑换记录</li>
						</ul>
						<!-- .breadcrumb -->
					</div>
					<div class="page-content">
						<div class="row">
							<div class="col-xs-12">
								<!-- PAGE CONTENT BEGINS -->
								<form action="exchangegood!watchExLogByTel" name="seekoneMember"
									method="post">
									<div id="btn-bottom">
										<input type="text"
											name="member.mobile" id="mobile" placeholder="手机号" />&nbsp;
										<input type="button" class="btn btn-primary radius btn-sm"
											value="搜索" id="oneMemberBtn">
									</div>
								</form>
								<table id="table_bug_report"
									class="table table-striped table-bordered table-hover">
									<tr>
										<th>会员手机号</th>
										<th>姓名</th>
										<th>商品名称</th>
										<th>店铺名称</th>
										<th>兑换时间</th>
									</tr>
									<c:forEach items="${exchangeLogs}" var="exchangeLog"
										varStatus="status">
										<tr <c:if test="${status.count%2==0}">bgcolor="#d8e7f0"</c:if>
											<c:if test="${status.count%2!=0}">bgcolor="#ffffff"</c:if>>
											<td>${exchangeLog.member.mobile}
											</td>
											<td>
													<c:choose>
														<c:when test="${not empty exchangeLog.member.name}">
											   			${exchangeLog.member.name }
											   		</c:when>
														<c:otherwise>
														</c:otherwise>
													</c:choose>
											</td>
											<td>${exchangeLog.exchangeGood.goodname}</td>
											<td>${exchangeLog.shop.name}</td>
											<td>${exchangeLog.createTime }</td>
										</tr>
									</c:forEach>
								</table>
								<div class="row" id="page">
									<ul class="pagination">
										<li><a href="exchangegood!watchExLog?index=1">首页</a>
										</li>
										<li class="prev"><a
											href="exchangegood!watchExLog?index=${index-1}"> <i
												class="icon-double-angle-left"></i> </a></li>
										<!-- <li>
								            <a href="smsLog!getList?index=${index-1}">上一页</a>
								        </li> -->
										<li><a href="javascript:void(0)">${index }</a>
										</li>
										<!-- <li>
									     	<a href="smsLog!getList?index=${index+1}">下一页</a>
									     </li> -->
										<li><a href="exchangegood!watchExLog?index=${index+1 }">
												<i class="icon-double-angle-right"></i> </a></li>
										<li><a href="exchangegood!watchExLog?index=${page }">末页</a>
										</li>
										<li><a href="javascript:void(0)">共${page}页</a>
										</li>
									</ul>
								</div>
								<!-- PAGE CONTENT ENDS -->
							</div>
							<!-- /.col -->
						</div>
						<!-- /.row -->
					</div>
					<!-- /.page-content -->
				</div>
				<!-- /.main-content -->
			</div>
			<!-- /.main-container-inner -->
			<a href="#" id="btn-scroll-up"
				class="btn-scroll-up btn btn-sm btn-inverse"
				style="position:fixed;bottom:0;"> <i
				class="icon-double-angle-up icon-only bigger-110"></i> </a>
		</div>
		<!-- /.main-container -->
		<div class="push"></div>
	</div>
	<c:import url="/collect/down.jsp"></c:import>
</body>

<script type="text/javascript">
	$(document).ready(function() {
		$("#oneMemberBtn").click(function() {
			var mobile = $("#mobile").val();
			if (mobile.length != 0) {
				$("form[name='seekoneMember']").submit();
			}
		});

		//防收回；兑换管理:$兑换记录
		$('.goodsexchange > ul').show();
		$('.goodsexchange > ul > li > a').eq(1).css("color", "red");
	});
</script>
</html>
